Doc-O-Matic Live Demo / XmlNotepad Namespace / Interfaces / IOleCommandTarget / IOleCommandTarget Methods (XmlNotepad) / IOleCommandTarget.QueryStatus
IOleCommandTarget.QueryStatus
Close
domv10-banner-200
IOleCommandTarget.QueryStatus Method

Namespace: XmlNotepad

C++
C#
Visual Basic
IDL
JavaScript
void QueryStatus(Guid ^ pguidCmdGroup, UInt32 cCmds, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] OLECMD[] prgCmds, OLECMDTEXT ^ CmdText);

IMPORTANT: The order of the methods is critical here. You perform early binding in most cases, so the order of the methods here MUST match the order of their vtable layout (which is determined by their layout in IDL). The interop calls key off the vtable ordering, not the symbolic names. Therefore, if you switched these method declarations and tried to call the Exec method on an IOleCommandTarget interface from your application, it would translate into a call to the QueryStatus method instead.

Copyright © 2020. All rights reserved.